package com.letoken.platform.repo.app.req.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 用户登录或注册对象
 *
 * @Author: letokenlabs
 * @Date: 2021/3/18 19:01
 */
@Data
@ApiModel(value = "用户登录或注册对象", description = "用户登录或注册对象")
public class AppUserLogin {

    @ApiModelProperty(name = "deviceId", value = "设备ID（不能为空；字符长度50）", required = true, example = "16DB7C36-E61C-4855-AE70-34F3EDE09D12")
    @NotBlank(message = "80201003")
    @Size(max = 50, message = "80201004")
    private String deviceId;

    @ApiModelProperty(name = "deviceRes", value = "设备源（不能为空；苹果手机：IOS，安卓手机：ANDROID）", required = true, example = "ANDROID")
    @Length(max = 10)
    @NotNull(message = "80201005")
    private String deviceRes;

    @ApiModelProperty(name = "deviceModel", value = "设备类型（不能为空；字符长度32）", required = true, example = "HUAWEI")
    @NotBlank(message = "80201010")
    @Size(max = 32, message = "80201011")
    private String deviceModel;

    @ApiModelProperty(name = "devicePlatforms", value = "设备型号（不能为空；字符长度64）", required = true, example = "HUAWEI BND-AL10,9")
    @NotBlank(message = "80201009")
    @Size(max = 64, message = "80201010")
    private String devicePlatforms;

    @ApiModelProperty(name = "lang", value = "语言（不能为空；简体中文：ZH，繁体中文：ZHT，英文：EN）", required = true, example = "ZHT")
    @NotNull(message = "80201011")
    private String lang;

    @ApiModelProperty(name = "version", value = "客户端版本（不能为空；字符长度20）", required = true, example = "V1.0.0")
    @NotBlank(message = "80201013")
    @Size(max = 20, message = "80201014")
    private String version;

}
